//#define __DEBUG__
// by Xeno
#define THIS_FILE "fn_recapturedupdate.sqf"
#include "x_setup.sqf"

private ["_index","_target_array", "_target_name", "_targetName","_state"];
PARAMS_2(_index,_state);
_target_array = GVAR(target_names) select _index;
_target_name = _target_array select 1;
switch (_state) do {
	case 0: {
		_target_name setMarkerColorLocal "ColorRed";
		_target_name setMarkerBrushLocal "FDiagonal";
		hint composeText[
			parseText("<t color='#f0ff0000' size='2'>" + (localize "STR_DOM_MISSIONSTRING_659") + "</t>"), lineBreak,
			parseText("<t size='1'>" + format [(localize "STR_DOM_MISSIONSTRING_660"), _target_name] + "</t>")
		];
		format [(localize "STR_DOM_MISSIONSTRING_661"), _target_name] call FUNC(HQChat);
	};
	case 1: {
		_target_name setMarkerColorLocal "ColorGreen";
		_target_name setMarkerBrushLocal "Solid";
		hint composeText[
			parseText("<t color='#f00000ff' size='2'>" + (localize "STR_DOM_MISSIONSTRING_662") + "</t>"), lineBreak,
			parseText("<t size='1'>" + format [(localize "STR_DOM_MISSIONSTRING_663"), _target_name] + "</t>")
		];
	};
};